﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace teacher.Util
{
    public class Page
    {
        private int _pageSize;

        public int pageSize
        {
            get { return _pageSize; }
            set { _pageSize = value; }
        }
        private int _pageNumber;

        public int pageNumber
        {
            get { return _pageNumber; }
            set { _pageNumber = value; }
        }
        private int _totalCount;

        public int totalCount
        {
            get { return _totalCount; }
            set { _totalCount = value; }
        }
        private int _totalPage;

        public int totalPage
        {
            get { return _totalPage; }
            set { _totalPage = value; }
        }
        public Page(int total,int pageSize,int pageNumber){
            this.totalCount = total;
            this.pageSize = pageSize;
            this.pageNumber = pageNumber;
            this.totalPage = total / pageSize + (total % pageSize == 0 ? 0 : 1);
        }
    }
}